import React, {Component} from "react";
import {
	View,
	Text,
} from "react-native";
import {
	StackNavigator,
	TabNavigator,
} from "react-navigation";

import HomePage from "./page/HomePage"; // 首页
import ServerCenter from "./page/ServerCenter"; // 服务中心
import HealthManager from "./page/HealthManager"; // 健康管理师
import Shopping from "./page/Shopping"; // 商城
import Personal from "./page/Personal"; // 我的


import Category from "./components/categories/Category";//分类
import AllCategory from "./components/categories/AllCategory";//全部商品
import Cart from "./components/Cart/Cart";//购物车
import OrderAndAddr from "./components/order/OrderAndAddr";//我的订单
import AllOrders from "./components/order/AllOrders";//全部订单
import ConfirmOrder from "./components/order/ConfirmOrder";//确认订单页
import GenerateOrder from "./components/order/GenerateOrder";//生成订单页
import CategoryDetails from "./components/categories/CategoryDetails";//商品详情
import ApplyForReturn from "./components/order/ApplyForReturn";//申请退换货
import ReceiveAddr from "./components/order/ReceiveAddr";//收货地址管理
import NewAddress from "./components/order/NewAddress";//新增收货地址

import PendPay from "./components/order/PendPay";//待付款
import ToReceive from "./components/order/ToReceive";//待收货
import Returns from "./components/order/Returns";//退换货
//个人中心
import CashBalance from "./components/personal/cash/cashBalance";//现金余额
import Recharge from "./components/personal/cash/recharge"; //充值
import Withdrawals from "./components/personal/cash/Withdrawals"; //提现

//我的健康档案
import HealthRecord from "./components/personal/myHealthRecord/HealthRecord"; //健康档案

import Yiintegral from "./components/personal/integral/Yiintegral"; //易积分

import DynamicData from "./components/personal/myHealthRecord/DynamicData";//动态监测数据

//注册邀请码
import RegisterCode from "./components/personal/RegisterCode"; //注册邀请码

//我的个人资料
import PersonalInfo from "./components/personal/PersonalInfo"; //我的个人资料

const TabNav = TabNavigator({
	HomePage: {
		screen: HomePage,
	},
	ServerCenter: {
		screen: ServerCenter,
	},
	HealthManager: {
		screen: HealthManager,
	},
	Shopping: {
		screen: Shopping,
	},
	Personal: {
		screen: Personal,
	},
}, {
	tabBarPosition: "bottom",
	tabBarOptions: {
		showIcon: true,
		inactiveTintColor: "#9e9898",
		activeTintColor: gColor.importColor,
		labelStyle: {
			fontSize: global.gFontSize.font1,
		},
		style: {
			backgroundColor: global.gColor.color1,
		},
		indicatorStyle: {
			height: 0,
		}
	},

})

const MyApp = StackNavigator({
	Home: {
		screen: TabNav,
	},
	Category: {
		screen: Category,//分类
	},
	CategoryDetails: {
		screen: CategoryDetails,//商品详情
	},
	AllCategory: {
		screen: AllCategory,//全部商品
	},
	Cart: {
		screen: Cart,//购物车
	},
	OrderAndAddr: {
		screen: OrderAndAddr,//我的订单
	},
	AllOrders: {
		screen: AllOrders,//全部订单
	},
	ConfirmOrder: {
		screen: ConfirmOrder,//确认订单页
	},
	GenerateOrder: {
		screen: GenerateOrder,//生成订单页
	},
	ApplyForReturn: {
		screen: ApplyForReturn,//申请退换货
	},
	ReceiveAddr: {
		screen: ReceiveAddr,//收货地址管理
	},
	NewAddress: {
		screen: NewAddress,//新增收货地址
	},
	HealthRecord: {
		screen: HealthRecord, //健康档案
	},
	CashBalance: {
		screen: CashBalance,  //现金余额
	},
	Recharge: {
		screen: Recharge, //充值
	},
	Withdrawals: {
		screen: Withdrawals, //提现
	},
	Yiintegral: {
		screen: Yiintegral, //易积分
	},
	DynamicData: {
		screen: DynamicData,//动态监测数据
	},
	PendPay: {
		screen: PendPay,//待付款
	},
	ToReceive: {
		screen: ToReceive,//待收货
	},
	Returns: {
		screen: Returns,//退换货
	},
	RegisterCode: {
		screen: RegisterCode, //注册邀请码
	},
	PersonalInfo: {
		screen: PersonalInfo, //我的个人资料
	},

})

export default MyApp;